<template>
  <div>
    <!-- <div style="display: none;">{$random_content}</div> -->
    <div class="mainmodule">
      <div class="mianad" v-if="dlsInfo.is_user_img">
        <a @click="openLink(dlsInfo.user_img_link)">
          <img :src="dlsInfo.user_img_ggt || dlsInfo.ad_img" alt />
        </a>
      </div>
      <div class="mainlist">
        <ul>
          <!-- <li v-if="dlsInfo.show_dl_product">
            <div @click="Jump('dlsGoods')" class="icon_supplier">
              {{dlsInfo.agent_item_name}}
              <span>{{dlsInfo.agent_item_count}}</span>
              <i class="icon-right"></i>
            </div>
          </li> -->
          <!-- <li v-if="dlsInfo.show_dl_agencies">
            <div @click="Jump('nextLevelAgency')" class="icon_xjuser">
              {{dlsInfo.ftitle_agencies}}
              <span>{{dlsInfo.agency_total}}</span>
              <i class="icon-right"></i>
            </div>
          </li> -->
          <!-- <li v-if="dlsInfo.show_dl_agency_user">
            <div @click="Jump('nextLevelAgencyUser')" class="icon_wdmember">
              {{dlsInfo.ftitle_agency_user}}
              <span>{{dlsInfo.agency_user_total}}</span>
              <i class="icon-right"></i>
            </div>
          </li> -->
          <!-- <li v-if="dlsInfo.show_dls_teamOrder">
            <div @click="Jump('agencyOrder')" class="icon_fxorder">
              {{dlsInfo.ftitle_agency_order}}
              <span>{{dlsInfo.agency_order_total}}</span>
              <i class="icon-right"></i>
            </div>
          </li> -->
          <li v-if="dlsInfo.show_dl_commission">
            <div @click="Jump('myCommission')" class="icon_wdyj">
              {{dlsInfo.ftitle_commission}}
              <i class="icon-right"></i>
            </div>
          </li>
          <li v-if="!dlsInfo.is_app_open && dlsInfo.is_store_log == 1 && dlsInfo.show_myStore">
            <div @click="Jump('store')" class="icon_dzd">
              {{dlsInfo.ftitle_store}}
              <i class="icon-right"></i>
            </div>
          </li>
          <li v-if="dlsInfo.show_dls_levelSubcontractor">
            <div @click="Jump('dlsRecommend')" class="icon_tjitem">
              推荐列表
              <i class="icon-right"></i>
            </div>
          </li>
          <li v-if="dlsInfo.show_dls_teamPerformance">
            <div @click="Jump('dlsYeJi')" class="icon_tdyj">
              团队业绩
              <i class="icon-right"></i>
            </div>
          </li>
          <li v-if="dlsInfo.show_dls_superior && dlsInfo.superior_user_id_info != 0">
            <div @click="Jump('director')" class="icon_wdsj">
              {{dlsInfo.ftitle_superior}}
              <i class="icon-right"></i>
            </div>
          </li>
          <li v-if="dlsInfo.show_dls_superior_agent && dlsInfo.dls_is_display">
            <div @click="Jump('parentInfo',{id:dlsInfo.dls_parent_id,name:dlsInfo.user_dls_info,type:'dls',grade:dlsInfo.dls_grade})" class="icon_mysuperiora">
              {{dlsInfo.ftitle_dls_superior}}
              <i class="icon-right"></i>
            </div>
          </li>
          <li v-if="dlsInfo.is_dls_team_bonus">
            <div @click="Jump('dlsGlj')" class="icon_tdglj">
              团队管理业绩
              <i class="icon-right"></i>
            </div>
          </li>
          <li v-if="dlsInfo.show_dls_orderRanking">
            <div @click="Jump('DlsSalesSort')" class="icon_cdlph">
              出单量排行
              <i class="icon-right"></i>
            </div>
          </li>

          <!-- 定制  三亚云游世界 start -->
          <!--@click="Jump('dlsLowersCommissionCountLists')"-->
          <li v-if="dlsInfo.syyysj_dz == 1">
            <a href="/user/dlsLowersCommissionCountLists" style="padding-right: 0">
              <div  class="icon_xjxndd">
                下级收益统计

                <i class="icon-right"></i>
              </div>
            </a>
          </li>
          <!--我的名片-->
          <li v-if="dlsInfo.show_dls_share_card">
            <div @click="Jump('dlsCard')"
                 class="icon2_16">
              我的名片
              <span></span>
              <i class="icon-right"></i>
            </div>
          </li>
          <!--@click="Jump('dlsSelfBuildPrizeDetail')"-->
          <li v-if="dlsInfo.syyysj_dz == 1">
            <a href="/user/dlsSelfBuildPrizeDetail" style="padding-right: 0">
              <div class="icon_wdzc">
                奖励详情
                <i class="icon-right"></i>
              </div>
            </a>
          </li>
          <!-- 定制  三亚云游世界 end -->
          <li v-if="dlsInfo.common_center_renovation_parameter.showShareLinkDls">
            <div @click="Jump('shareSelect')" class="icon20_1_fx">
              万能链接
              <i class="icon-right"></i>
            </div>
          </li>
          <!-- 视频号数据 -->
          <li v-if="dlsInfo.show_video_num_data_dls">
            <div @click="Jump('venderOrder', {type: 'live'})"
                 class="icon_sphsj">视频号数据
              <span></span>
              <svg-icon icon-class="icon_right"
                        class="icon_right"></svg-icon>
            </div>
          </li>
        </ul>


        <!-- 自定义项 -->
        <ul v-if="dlsInfo.dataset_dls && dlsInfo.dataset_dls.length>0">
          <li v-for="(item,index) in dlsInfo.dataset_dls"
              :key="index">
            <a @click="openLink(item.link)"
              class="custom_item"
              :style="{backgroundImage: 'url('+item.pic+')'}">
              {{item.showtitle}}
              <svg-icon icon-class="icon_right"
                        class="icon_right"></svg-icon>
            </a>
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script>
import Vue from 'vue'
import { openPage } from '@/utils/utils.js'
export default Vue.extend({
  props: {
    dlsInfo: {
      type: Object
    }
  },
  methods: {
    // TODO 小程序跳转
    openLink(link) {
      openPage(link)
    },
    Jump(url, data) {
      this.$JumpPath(this, url, data)
    },
    _show_qrcode() {
      this.$emit('showQrcode')
    }
  }
})
</script>

<style lang="scss">
@import 'src/styles/user/index.scss';
</style>
